<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.qipay.baas.model.Order" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML >
<html>
<head>
    <base href="<%=basePath%>">

    <title>火把支付</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <%
        String orderNo = (String) request.getAttribute("orderNo");
        Order order = (Order) request.getAttribute("order");
    %>
</head>

<body>

    <div style="font-size: 1rem;width:100%;border-bottom:1px solid #dcdcdc;line-height:2.2rem;">
        <span style="display:inline-block;width:7rem;border:0px solid red;">银行代号：</span>
        <input style="width:60%;border:none;line-height:1.2rem;padding-left:0.5rem;" readonly="readonly" value="<%=order.getBankCode()%>" type="text" />
    </div>
    <div style="font-size: 1rem;width:100%;border-bottom:1px solid #dcdcdc;line-height:2.2rem;">
        <span style="display:inline-block;width:7rem;border:0px solid red;">银行卡类型：</span>
        <select id = "cardType" style="width:60%;border:none;height:1.5rem;padding-left:0.5rem;">
        	<option value="DEBITCARD">借记卡</option>
        	<option value="CREDITCARD">储蓄卡</option>
        </select>
    </div>
    <div style="font-size: 1rem;width:100%;border-bottom:1px solid #dcdcdc;line-height:2.2rem;">
        <span style="display:inline-block;width:7rem;border:0px solid red;">银行卡号：</span>
        <input style="width:60%;border:none;line-height:1.2rem;padding-left:0.5rem;" id="bankCardNum" value="" type="text" placeholder="银行卡号"/>
    </div>
    <div style="font-size: 1rem;width:100%;border-bottom:1px solid #dcdcdc;line-height:2.2rem;">
        <span style="display:inline-block;width:7rem;border:0px solid red;">身份证号码：</span>
        <input style="width:60%;border:none;line-height:1.2rem;padding-left:0.5rem;" id="idCardNum" value="" type="text" placeholder="身份证号码"/>
    </div>
    <div style="font-size: 1rem;width:100%;border-bottom:1px solid #dcdcdc;line-height:2.2rem;">
        <span style="display:inline-block;width:7rem;border:0px solid red;">持卡人姓名：</span>
        <input style="width:60%;border:none;line-height:1.2rem;padding-left:0.5rem;" id="cardUserName" value="" type="text" placeholder="持卡人姓名"/>
    </div>
    <div style="font-size: 1rem;width:100%;border-bottom:1px solid #dcdcdc;line-height:2.2rem;">
        <span style="display:inline-block;width:7rem;border:0px solid red;">绑定手机号：</span>
        <input style="width:60%;border:none;line-height:1.2rem;padding-left:0.5rem;" id="bankCardPhone" value="" type="text" placeholder="绑定手机号"/>
    </div>
	<div style="text-align:center;" >
	    <input onclick="yanzhengma();" id="submitsubmit" style="display:inline-block;cursor:pointer;font-size: 1.1rem;width:8rem;text-align:center;line-height:2rem;
	    margin-top:1rem;margin-left:0.5rem;padding:0 0.5rem;background:#3385ff;color:#fff;border-radius:3px;border:none;" type="button" value="提交"/>
	</div>

<script>
	function yanzhengma(){
		var orderNo = "<%=orderNo%>";
		var cardType=document.getElementById("cardType").value;
		var bankCardNum=document.getElementById("bankCardNum").value;
		var idCardNum=document.getElementById("idCardNum").value;
		var cardUserName=document.getElementById("cardUserName").value;
		var bankCardPhone=document.getElementById("bankCardPhone").value;
        window.location.href="http://"+window.location.host+"/api/redirect/v1/union/quick?orderNo="+orderNo
            +"&cardType="+cardType
            +"&bankCardNum="+bankCardNum
            +"&idCardNum="+idCardNum
            +"&cardUserName="+cardUserName
            +"&bankCardPhone="+bankCardPhone
        ;
	}

</script>
</body>
</html>
